/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ficherofiguras;

import java.io.Serializable;

/**
 *
 * @author AULAC
 */
public class Rectangulo extends Figura implements Serializable{
    
    private float base;
    private float altura;

    public Rectangulo(float base, float altura, String color) {
        super(color);
        this.base = base;
        this.altura = altura;
    }

    public float getBase() {
        return base;
    }

    public void setBase(float base) {
        this.base = base;
    }

    public float getAltura() {
        return altura;
    }

    public void setAltura(float altura) {
        this.altura = altura;
    }

    @Override
    public String toString() {
        return "Rectángulo | Base: "+base+" | Altura: "+altura+" | "+super.toString();
    }
    
    @Override
    public float calcularArea(){
        
        return this.base*this.altura;
        
    }
    
}
